package com.cskaoyan.factory;

import com.cskaoyan.bean.Car;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author stone
 * @date 2021/11/18 15:39
 */
public class CarFactoryBean implements FactoryBean<Car> {
    @Override
    public Car getObject() throws Exception {
        //SE的代码风格提供Car的实例
        Car car = new Car();
        car.setSource("factoryBean");
        return car;
    }

    @Override
    public Class<?> getObjectType() {
        return Car.class;
    }
}
